package com.chis.netty.http.test.sms.smsServer;

/**
 * @Description webservice接口
 * @Company zwx
 * @author jw
 * @version 2018年8月14日
 */
public class SmsServiceLocator extends org.apache.axis.client.Service implements SmsService {

	/**序列化*/
	private static final long serialVersionUID = 1L;
	/**服务地址*/
	private String SmsServerPort_address = "http://10.88.99.29:7002/SmsService/SmsService";
	/**服务端口*/
	private String SmsServerPortWSDDServiceName = "SmsServerPort";

	public SmsServiceLocator() {
	}

	public SmsServiceLocator(org.apache.axis.EngineConfiguration config) {
		super(config);
	}

	public SmsServiceLocator(String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
		super(wsdlLoc, sName);
	}

	/**
	 * 获取服务地址
	 * @return 服务
	 * @throws javax.xml.rpc.ServiceException 异常
	 */
	public SmsServer getSmsServerPort() throws javax.xml.rpc.ServiceException {
		java.net.URL endpoint;
		try {
			endpoint = new java.net.URL(SmsServerPort_address);
		} catch (java.net.MalformedURLException e) {
			throw new javax.xml.rpc.ServiceException(e);
		}
		return getSmsServerPort(endpoint);
	}

	/**
	 * 获取服务地址
	 * @param portAddress 服务地址
	 * @return 服务
	 * @throws javax.xml.rpc.ServiceException 异常
	 */
	public SmsServer getSmsServerPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
		try {
			SmsServerPortBindingStub stub = new SmsServerPortBindingStub(portAddress, this);
			stub.setPortName(getSmsServerPortWSDDServiceName());
			return stub;
		} catch (org.apache.axis.AxisFault e) {
			return null;
		}
	}

	/**
	 * 获取服务端口
	 * @param serviceEndpointInterface 接口类
	 * @return 端口
	 * @throws javax.xml.rpc.ServiceException 异常
	 */
	public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
		try {
			if (SmsServer.class.isAssignableFrom(serviceEndpointInterface)) {
				SmsServerPortBindingStub stub = new SmsServerPortBindingStub(new java.net.URL(SmsServerPort_address), this);
				stub.setPortName(getSmsServerPortWSDDServiceName());
				return stub;
			}
		} catch (Throwable t) {
			throw new javax.xml.rpc.ServiceException(t);
		}
		throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  "
				+ (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
	}

	/**
	 * 获取服务端口
	 * @param portName 端口名称
	 * @param serviceEndpointInterface 接口类
	 * @return 端口
	 * @throws javax.xml.rpc.ServiceException 异常
	 */
	public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
		if (portName == null) {
			return getPort(serviceEndpointInterface);
		}
		String inputPortName = portName.getLocalPart();
		if ("SmsServerPort".equals(inputPortName)) {
			return getSmsServerPort();
		} else {
			java.rmi.Remote stub = getPort(serviceEndpointInterface);
			((org.apache.axis.client.Stub) stub).setPortName(portName);
			return stub;
		}
	}

	public javax.xml.namespace.QName getServiceName() {
		return new javax.xml.namespace.QName("http://service.sms.chis.com/", "SmsService");
	}

	/**端口*/
	private java.util.HashSet ports = null;

	/**
	 * 获取端口
	 * @return 端口
	 */
	public java.util.Iterator getPorts() {
		if (ports == null) {
			ports = new java.util.HashSet();
			ports.add(new javax.xml.namespace.QName("http://service.sms.chis.com/", "SmsServerPort"));
		}
		return ports.iterator();
	}

	/**
	 * 设置服务地址
	 * @param portName 服务名
	 * @param address 服务地址
	 * @throws javax.xml.rpc.ServiceException 异常
	 */
	public void setEndpointAddress(String portName, String address) throws javax.xml.rpc.ServiceException {

		if ("SmsServerPort".equals(portName)) {
			setSmsServerPortEndpointAddress(address);
		} else { // Unknown Port Name
			throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
		}
	}

	/**
	 * 设置服务地址
	 * @param portName 服务名
	 * @param address 服务地址
	 * @throws javax.xml.rpc.ServiceException 异常
	 */
	public void setEndpointAddress(javax.xml.namespace.QName portName, String address) throws javax.xml.rpc.ServiceException {
		setEndpointAddress(portName.getLocalPart(), address);
	}

	public void setSmsServerPortEndpointAddress(String address) {
		SmsServerPort_address = address;
	}

	public String getSmsServerPortAddress() {
		return SmsServerPort_address;
	}

	public String getSmsServerPortWSDDServiceName() {
		return SmsServerPortWSDDServiceName;
	}

	public void setSmsServerPortWSDDServiceName(String name) {
		SmsServerPortWSDDServiceName = name;
	}

}
